(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
  ["pages/product/goods"], {
    "2fa8": function (t, e, n) {
      "use strict";
      n.r(e);
      var o = n("a8a1"),
        i = n.n(o);
      for (var s in o) "default" !== s && function (t) {
        n.d(e, t, (function () {
          return o[t]
        }))
      }(s);
      e["default"] = i.a
    },
    "4f09": function (t, e, n) {},
    7785: function (t, e, n) {
      "use strict";
      var o = n("4f09"),
        i = n.n(o);
      i.a
    },
    "8e93": function (t, e, n) {
      "use strict";
      (function (t) {
        n("77a0");
        o(n("66fd"));
        var e = o(n("b019"));

        function o(t) {
          return t && t.__esModule ? t : {
            default: t
          }
        }
        t(e.default)
      }).call(this, n("543d")["createPage"])
    },
    a8a1: function (t, e, n) {
      "use strict";
      (function (t) {
        Object.defineProperty(e, "__esModule", {
          value: !0
        }), e.default = void 0;
        var o = s(n("a34a")),
          i = n("2f62");

        function s(t) {
          return t && t.__esModule ? t : {
            default: t
          }
        }

        function a(t) {
          return u(t) || c(t) || p(t) || r()
        }

        function r() {
          throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")
        }

        function c(t) {
          if ("undefined" !== typeof Symbol && Symbol.iterator in Object(t)) return Array.from(t)
        }

        function u(t) {
          if (Array.isArray(t)) return d(t)
        }

        function l(t, e) {
          var n;
          if ("undefined" === typeof Symbol || null == t[Symbol.iterator]) {
            if (Array.isArray(t) || (n = p(t)) || e && t && "number" === typeof t.length) {
              n && (t = n);
              var o = 0,
                i = function () {};
              return {
                s: i,
                n: function () {
                  return o >= t.length ? {
                    done: !0
                  } : {
                    done: !1,
                    value: t[o++]
                  }
                },
                e: function (t) {
                  throw t
                },
                f: i
              }
            }
            throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")
          }
          var s, a = !0,
            r = !1;
          return {
            s: function () {
              n = t[Symbol.iterator]()
            },
            n: function () {
              var t = n.next();
              return a = t.done, t
            },
            e: function (t) {
              r = !0, s = t
            },
            f: function () {
              try {
                a || null == n.return || n.return()
              } finally {
                if (r) throw s
              }
            }
          }
        }

        function p(t, e) {
          if (t) {
            if ("string" === typeof t) return d(t, e);
            var n = Object.prototype.toString.call(t).slice(8, -1);
            return "Object" === n && t.constructor && (n = t.constructor.name), "Map" === n || "Set" === n ? Array.from(t) : "Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? d(t, e) : void 0
          }
        }

        function d(t, e) {
          (null == e || e > t.length) && (e = t.length);
          for (var n = 0, o = new Array(e); n < e; n++) o[n] = t[n];
          return o
        }

        function h(t, e, n, o, i, s, a) {
          try {
            var r = t[s](a),
              c = r.value
          } catch (u) {
            return void n(u)
          }
          r.done ? e(c) : Promise.resolve(c).then(o, i)
        }

        function m(t) {
          return function () {
            var e = this,
              n = arguments;
            return new Promise((function (o, i) {
              var s = t.apply(e, n);

              function a(t) {
                h(s, o, i, a, r, "next", t)
              }

              function r(t) {
                h(s, o, i, a, r, "throw", t)
              }
              a(void 0)
            }))
          }
        }

        function f(t, e) {
          var n = Object.keys(t);
          if (Object.getOwnPropertySymbols) {
            var o = Object.getOwnPropertySymbols(t);
            e && (o = o.filter((function (e) {
              return Object.getOwnPropertyDescriptor(t, e).enumerable
            }))), n.push.apply(n, o)
          }
          return n
        }

        function g(t) {
          for (var e = 1; e < arguments.length; e++) {
            var n = null != arguments[e] ? arguments[e] : {};
            e % 2 ? f(Object(n), !0).forEach((function (e) {
              y(t, e, n[e])
            })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : f(Object(n)).forEach((function (e) {
              Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(n, e))
            }))
          }
          return t
        }

        function y(t, e, n) {
          return e in t ? Object.defineProperty(t, e, {
            value: n,
            enumerable: !0,
            configurable: !0,
            writable: !0
          }) : t[e] = n, t
        }
        var v = {
          data: function () {
            return {
              TabCur: 0,
              wanlsys: this.$wanlshop.wanlsys(),
              modalName: null,
              durect: 0,
              headerOpacity: 0,
              currentSwiper: 0,
              anchorlist: [{
                name: "主图",
                top: 0
              }, {
                name: "评价",
                top: 0
              }, {
                name: "详情",
                top: 0
              }, {
                name: "推荐",
                top: 0
              }],
              selectAnchor: 0,
              goodsData: {
                id: 0,
                category_id: 0,
                shop_id: 0,
                brand_id: 0,
                freight_id: 0,
                title: "",
                image: "",
                images: "",
                flag: "",
                content: "",
                category_attribute: [],
                activity: !1,
                price: null,
                interval_price: null,
                market_price: null,
                sales: 0,
                brand: {},
                freight: {
                  name: "",
                  isdelivery: 1
                },
                payment: 0,
                comment: 0,
                praise: 0,
                moderate: 0,
                negative: 0,
                like: 0,
                views: 0,
                status: "",
                category: {},
                follow: !0,
                sku: [],
                spu: [],
                promotion: [],
                coupon: [],
                comment_list: {
                  data: [],
                  figure: 0,
                  tag: []
                },
                shop: {
                  city: ""
                },
                shop_recommend: {}
              },
              reload: !0,
              likeData: [],
              current_page: 1,
              last_page: 1,
              status: "loading",
              contentText: {
                contentdown: " ",
                contentrefresh: "正在加载...",
                contentnomore: "没有更多数据了"
              },
              shopItemInfo: {},
              selectArr: [],
              subIndex: [],
              selectshop: {},
              selectNum: 1,
              isChoice: "",
              scrollAnimation: 0
            }
          },
          onLoad: function (t) {
            this.loadData(t), this.loadlikeData(), wx.showShareMenu({
              withShareTicket: !0,
              menus: ["shareAppMessage", "shareTimeline"]
            }), this.durect = this.$store.state.statistics.notice.notice + this.$store.state.statistics.notice.order + this.$store.state.statistics.notice.chat + this.$store.state.statistics.order.pay + this.$store.state.statistics.order.delive + this.$store.state.statistics.order.receiving + this.$store.state.statistics.order.evaluate
          },
          onPageScroll: function (t) {
            var e = 150;
            t.scrollTop = t.scrollTop > e ? 150 : t.scrollTop, this.headerOpacity = t.scrollTop * (1 / e)
          },
          onReachBottom: function () {
            this.current_page >= this.last_page ? this.status = "noMore" : (this.reload = !1, this.current_page = this.current_page + 1, this.status = "loading", this.loadlikeData())
          },
          watch: {
            selectshop: function (t, e) {
              t.price != e.price && this.queryCoupon(t.price)
            }
          },
          computed: g({
            canCount: function () {
              return this.subIndex.some((function (t) {
                return -1 === t
              }))
            }
          }, (0, i.mapState)(["cart", "common"])),
          methods: {
            map: function map(e) {
              var lat = parseFloat(e.shop.lat)
              var lng = parseFloat(e.shop.lng)

                  wx.openLocation({//​使用微信内置地图查看位置。
                    latitude: lat,//要去的纬度-地址
                    longitude: lng,//要去的经度-地址
                    name: e.shop.city,
                    address:e.shop.city,
                  })


        }, call: function map(e) {
   wx.makePhoneCall({

      phoneNumber:e.shop.phone,

    })
        },
            loadData: function (t) {
              t.uid = wx.getStorageSync("wanlshop:user").id;
              var e = this;
              return m(o.default.mark((function n() {
                return o.default.wrap((function (n) {
                  while (1) switch (n.prev = n.next) {
                    case 0:
                      e.$api.get({
                        url: "/wanlshop/product/goods",
                        data: t,
                        success: function (t) {
                          if (t.content = t.content.replace(/<img [^>]*src=['"]([^'"]+)[^>]*>/gi, (function (t, n) {
                              var o = '<img style="display: block; max-width: 100%;" src="'.concat(e.$wanlshop.oss(n, 500, 0), '">');
                              return o
                            })), 0 == t.sku.length) t.interval_price = t.price, t.market_price = t.price;
                          else {
                            var n, o = [],
                              i = [],
                              s = l(t.sku);
                            try {
                              for (s.s(); !(n = s.n()).done;) {
                                var a = n.value;
                                o.push(a.price), i.push(a.market_price)
                              }
                            } catch (p) {
                              s.e(p)
                            } finally {
                              s.f()
                            }
                            var r = Math.min.apply(null, o),
                              c = Math.max.apply(null, o),
                              u = Math.max.apply(null, i);
                            t.interval_price = r == c ? r : r + "-" + c, t.market_price = Number(u).toFixed(2)
                          }
                          e.goodsData = t, e.goodsData.spu.map((function (t) {
                            e.selectArr.push(""), e.subIndex.push(-1)
                          })), e.checkItem(), e.checkInpath(-1), setTimeout((function () {
                            e.calcAnchor()
                          }), 1e3)
                        }
                      });
                    case 1:
                    case "end":
                      return n.stop()
                  }
                }), n)
              })))()
            },
            loadlikeData: function () {
              var t = this;
              return m(o.default.mark((function e() {
                return o.default.wrap((function (e) {
                  while (1) switch (e.prev = e.next) {
                    case 0:
                      t.$api.get({
                        url: "/wanlshop/product/likes?pages=goods",
                        data: {
                          page: t.current_page
                        },
                        success: function (e) {
                          t.likeData = t.reload ? e.data : t.likeData.concat(e.data), t.current_page = e.current_page, t.last_page = e.last_page, t.status = "more"
                        }
                      });
                    case 1:
                    case "end":
                      return e.stop()
                  }
                }), e)
              })))()
            },
            queryCoupon: function (t) {
              var e = this;
              return m(o.default.mark((function n() {
                return o.default.wrap((function (n) {
                  while (1) switch (n.prev = n.next) {
                    case 0:
                      e.$api.post({
                        url: "/wanlshop/coupon/query",
                        data: {
                          shop_id: e.goodsData.shop_id,
                          goods_id: e.goodsData.id,
                          shop_category_id: e.goodsData.shop_category_id,
                          price: t
                        },
                        success: function (t) {
                          e.goodsData.coupon = t
                        }
                      });
                    case 1:
                    case "end":
                      return n.stop()
                  }
                }), n)
              })))()
            },
            onReceive: function (t) {
              var e = this;
              return m(o.default.mark((function n() {
                var i;
                return o.default.wrap((function (n) {
                  while (1) switch (n.prev = n.next) {
                    case 0:
                      i = e.goodsData.coupon[t], e.$api.post({
                        url: "/wanlshop/coupon/receive",
                        loadingTip: "领取中",
                        data: {
                          id: i.id
                        },
                        success: function (t) {
                          i.id = t.id, i.state = !0, e.$wanlshop.msg(t.msg), e.$store.commit("statistics/dynamic", {
                            coupon: e.$store.state.statistics.dynamic.coupon + 1
                          })
                        }
                      });
                    case 2:
                    case "end":
                      return n.stop()
                  }
                }), n)
              })))()
            },
            skuClick: function (t, e, n, o) {
              t.ishow && (this.selectArr[e] != t.name ? (this.$set(this.selectArr, e, t.name), this.$set(this.subIndex, e, o)) : (this.$set(this.selectArr, e, ""), this.$set(this.subIndex, e, -1)), this.checkInpath(e), this.selectArr.every((function (t) {
                return "" != t
              })) && (this.selectshop = this.shopItemInfo[this.selectArr], this.selectNum = 1))
            },
            checkInpath: function (t) {
              for (var e = 0, n = this.goodsData.spu.length; e < n; e++)
                if (e != t)
                  for (var o = this.goodsData.spu[e].item.length, i = 0; i < o; i++)
                    if (-1 == this.subIndex[e] || i != this.subIndex[e]) {
                      var s = a(this.selectArr);
                      this.$set(s, e, this.goodsData.spu[e].item[i].name);
                      var r = s.filter((function (t) {
                        return "" !== t && "undefined" !== typeof t
                      }));
                      this.shopItemInfo.hasOwnProperty(r) ? this.$set(this.goodsData.spu[e].item[i], "ishow", !0) : this.$set(this.goodsData.spu[e].item[i], "ishow", !1)
                    }
            },
            checkItem: function () {
              var t = this;
              this.goodsData.sku.reduce((function (e, n) {
                return e.concat(n.difference.reduce((function (e, o) {
                  return e.concat(e.map((function (e) {
                    return t.shopItemInfo.hasOwnProperty([].concat(a(e), [o])) || (t.shopItemInfo[[].concat(a(e), [o])] = n), [].concat(a(e), [o])
                  })))
                }), [
                  []
                ]))
              }), [
                []
              ])
            },
            changeNum: function (t) {
              this.selectNum = parseInt(t)
            },
            swiperChange: function (t) {
              this.currentSwiper = t.detail.current
            },
            showModal: function (t) {
              var e = this;
              this.isChoice = "", "share" == t && "share" != this.modalName && setTimeout((function () {
                e.scrollAnimation = 0
              }), 300), this.modalName = t
            },
            hideModal: function (t) {
              t ? this.showModal(t) : this.modalName = null
            },
            wanlShare: function (t) {
              t ? this.$wanlshop.auth("/pages/user/complaint/complaint?id=".concat(this.goodsData.id, "&type=1")) : this.modalName = null
            },
            moveHandle: function () {},
            follow: function () {
              var t = this;
              this.goodsData.follow = !this.goodsData.follow, this.goodsData.follow ? this.$store.commit("statistics/dynamic", {
                collection: this.$store.state.statistics.dynamic.collection + 1
              }) : this.$store.commit("statistics/dynamic", {
                collection: this.$store.state.statistics.dynamic.collection - 1
              }), this.$api.post({
                url: "/wanlshop/product/follow",
                data: {
                  id: this.goodsData.id
                },
                success: function (e) {
                  t.goodsData.follow = e
                }
              })
            },
            toAnchor: function (e) {
              this.selectAnchor = e, t.pageScrollTo({
                scrollTop: this.anchorlist[e].top,
                duration: 200
              })
            },
            calcAnchor: function () {
              var e = this,
                n = null;
              n = t.createSelectorQuery().in(this), n.select("#evaluate").boundingClientRect((function (t) {
                e.anchorlist[1].top = t.top - e.wanlsys.height - 45
              })).exec(), n.select("#details").boundingClientRect((function (t) {
                e.anchorlist[2].top = t.top - e.wanlsys.height - 45
              })).exec(), n.select("#recommend").boundingClientRect((function (t) {
                e.anchorlist[3].top = t.top - e.wanlsys.height - 45
              })).exec()
            },
            onTag: function (t) {
              this.$wanlshop.to("/pages/product/comment?id=" + this.goodsData.id + "&praise=" + this.goodsData.praise + "&tag=" + t)
            },
            toCart: function () {

              this.$wanlshop.to("/pages/cart/cart")
            },
            completeSelection: function () {
              this.canCount ? this.$wanlshop.msg("请选择完成规格") : this.ProcessingData()
            },
            SubmitData: function (t, e) {
              1 == e ? this.canCount ? this.$wanlshop.msg("请选择完成规格") : (this.isChoice = t, this.ProcessingData()) : (this.modalName = "option", this.isChoice = t)
            },
            ProcessingData: function () {
              if ("addToCart" == this.isChoice) this.$store.dispatch("cart/add", {
                shop_id: this.goodsData.shop_id,
                shop_name: this.goodsData.shop.shopname,
                goods_id: this.goodsData.id,
                title: this.goodsData.title,
                number: this.selectNum,
                image: this.goodsData.image,
                sku: this.selectshop,
                sku_id: this.selectshop.id,
                sum: this.$wanlshop.bcmul(this.selectshop.price, this.selectNum)
              }), this.$wanlshop.msg("已加购物车");
              else if ("placeOrder" == this.isChoice) {
                var e = [{
                  goods_id: this.goodsData.id,
                  number: this.selectNum,
                  sku_id: this.selectshop.id
                }];
                this.$store.state.user.isLogin ? t.redirectTo({
                  url: "/pages/user/order/addorder?type=goods&data=".concat(JSON.stringify(e))
                }) : this.$wanlshop.to("/pages/user/auth/auth")
              } else this.$wanlshop.msg("数据异常");
              this.hideModal()
            },
            productSearch: function (t) {
              this.$wanlshop.to("/pages/product/search?keywords=".concat(t), "fade-in", 100)
            }
          }
        };
        e.default = v
      }).call(this, n("543d")["default"])
    },
    b019: function (t, e, n) {
      "use strict";
      n.r(e);
      var o = n("b4e7"),
        i = n("2fa8");
      for (var s in i) "default" !== s && function (t) {
        n.d(e, t, (function () {
          return i[t]
        }))
      }(s);
      n("7785");
      var a, r = n("f0c5"),
        c = Object(r["a"])(i["default"], o["b"], o["c"], !1, null, null, null, !1, o["a"], a);
      e["default"] = c.exports
    },
    b4e7: function (t, e, n) {
      "use strict";
      n.d(e, "b", (function () {
        return i
      })), n.d(e, "c", (function () {
        return s
      })), n.d(e, "a", (function () {
        return o
      }));
      var o = {
          wanlRate: function () {
            return n.e("components/wanl-rate/wanl-rate").then(n.bind(null, "a5c6"))
          },
          wanlDivider: function () {
            return n.e("components/wanl-divider/wanl-divider").then(n.bind(null, "b661"))
          },
          wanlProduct: function () {
            return Promise.all([n.e("common/vendor"), n.e("components/wanl-product/wanl-product")]).then(n.bind(null, "d93b"))
          },
          uniLoadMore: function () {
            return n.e("components/uni-load-more/uni-load-more").then(n.bind(null, "ac38"))
          },
          wanlDirect: function () {
            return n.e("components/wanl-direct/wanl-direct").then(n.bind(null, "0bd1"))
          },
          wanlShare: function () {
            return Promise.all([n.e("common/vendor"), n.e("components/wanl-share/wanl-share")]).then(n.bind(null, "f256"))
          },
          uniNumberBox: function () {
            return n.e("components/uni-number-box/uni-number-box").then(n.bind(null, "7e43"))
          }
        },
        i = function () {
          var t = this,
            e = t.$createElement,
            n = (t._self._c, t.__map(t.goodsData.images, (function (e, n) {
              var o = t.__get_orig(e),
                i = t.$wanlshop.oss(e, 400, 0);
              return {
                $orig: o,
                g0: i
              }
            }))),
            o = t.goodsData.shop.city ? t.goodsData.shop.city.split("/") : null,
            i = 0 != t.goodsData.coupon.length ? t.__map(t.goodsData.coupon, (function (e, n) {
              var o = t.__get_orig(e),
                i = n < 2 && ("reduction" == e.type || "vip" == e.type && "reduction" == e.usertype) ? Number(e.price) : null,
                s = n < 2 && ("reduction" == e.type || "vip" == e.type && "reduction" == e.usertype) ? Number(e.limit) : null,
                a = n < 2 && ("reduction" == e.type || "vip" == e.type && "reduction" == e.usertype) ? Number(e.price) : null,
                r = n < 2 && ("discount" == e.type || "vip" == e.type && "discount" == e.usertype) ? Number(e.discount) : null,
                c = n < 2 && ("discount" == e.type || "vip" == e.type && "discount" == e.usertype) ? Number(e.limit) : null,
                u = n < 2 && ("discount" == e.type || "vip" == e.type && "discount" == e.usertype) ? Number(e.discount) : null,
                l = n < 2 && "shipping" == e.type ? Number(e.limit) : null;
              return {
                $orig: o,
                m0: i,
                m1: s,
                m2: a,
                m3: r,
                m4: c,
                m5: u,
                m6: l
              }
            })) : null,
            s = t.canCount ? null : t.selectArr.join(" / "),
            a = t.goodsData.comment > 0 ? parseInt(t.goodsData.praise / t.goodsData.comment * 100) : null,
            r = t.__map(t.goodsData.comment_list.data, (function (e, n) {
              var o = t.__get_orig(e),
                i = t.$wanlshop.oss(e.user.avatar, 26, 26, 2, "avatar"),
                s = 0 != e.images.length ? t.__map(e.images, (function (e, n) {
                  var o = t.__get_orig(e),
                    i = n <= 3 ? t.$wanlshop.oss(e, 88, 88) : null;
                  return {
                    $orig: o,
                    g4: i
                  }
                })) : null;
              return {
                $orig: o,
                g3: i,
                l2: s
              }
            })),
            c = t.$wanlshop.oss(t.goodsData.shop.avatar, 52, 52, 2, "avatar"),
            u = t.$wanlshop.toFormat(t.goodsData.shop.like, "thousand"),
            l = t.__map(t.goodsData.shop_recommend, (function (e, n) {
              var o = t.__get_orig(e),
                i = t.$wanlshop.oss(e.image, 125, 120);
              return {
                $orig: o,
                g7: i
              }
            })),
            p = t.$wanlshop.appstc("/coupon/bg_coupon_3x.png"),
            d = t.__map(t.goodsData.coupon, (function (e, n) {
              var o = t.__get_orig(e),
                i = e.state ? t.$wanlshop.appstc("/coupon/img_couponcentre_received_3x.png") : null,
                s = "reduction" == e.type || "vip" == e.type && "reduction" == e.usertype ? Number(e.price) : null,
                a = "reduction" == e.type || "vip" == e.type && "reduction" == e.usertype ? Number(e.limit) : null,
                r = "reduction" == e.type || "vip" == e.type && "reduction" == e.usertype ? Number(e.price) : null,
                c = "discount" == e.type || "vip" == e.type && "discount" == e.usertype ? Number(e.discount) : null,
                u = "discount" == e.type || "vip" == e.type && "discount" == e.usertype ? Number(e.limit) : null,
                l = "discount" == e.type || "vip" == e.type && "discount" == e.usertype ? Number(e.discount) : null,
                p = "shipping" == e.type ? Number(e.limit) : null;
              return {
                $orig: o,
                g9: i,
                m8: s,
                m9: a,
                m10: r,
                m11: c,
                m12: u,
                m13: l,
                m14: p
              }
            })),
            h = t.$wanlshop.oss(t.goodsData.image, 50, 50),
            m = t.$wanlshop.oss(t.goodsData.image, 100, 100),
            f = t.selectArr.join(""),
            g = f ? t.selectArr.join(" ") : null;
          t._isMounted || (t.e0 = function (e) {
            return t.$wanlshop.back(1)
          }), t.$mp.data = Object.assign({}, {
            $root: {
              l0: n,
              g1: o,
              l1: i,
              g2: s,
              m7: a,
              l3: r,
              g5: c,
              g6: u,
              l4: l,
              g8: p,
              l5: d,
              g10: h,
              g11: m,
              g12: f,
              g13: g
            }
          })
        },
        s = []
    }
  },
  [
    ["8e93", "common/runtime", "common/vendor"]
  ]
]);
